#pragma once

#include <memory>

#include "../Math/Vector.h"
#include "../Network/KMeansNetwork.h"

using namespace std;

class CKMeansLearn
{
public:
	CKMeansLearn() = delete;

	CKMeansLearn(const shared_ptr<CKmeansNetwork> & pNN);

public:
	void Trainning(const Vector & trainData);

private:
	int FindNearCenter(const Vector & trainingData);

	void MoveCenter(const Vector & trainingData, int J);

protected:
	shared_ptr<CKmeansNetwork> m_NN;
};